package com.atghost.minio.util.response;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Admin
 */
@Getter
@AllArgsConstructor
public enum ComErrorCode implements BaseErrorCode {
    /**
     * 通用
     */
    SUCCESS("D00000", "SUCCESS"),
    FAILURE("E400", "BizExcption"),
    PARAM_MISS("E400", "Missing Required Parameter{%s}"),//参数不能为空
    PARAM_TYPE_ERROR("E400", "Parameter Type Mismatch{%s}"),//参数类型错误
    PARAM_TYPE_ERROR_V2("E402", "Parameter Binding Error{0}"),//参数绑定异常
    PARAM_VALID_ERROR("E400", "Parameter Validation Error{%s}"),//参数不合法
    UN_AUTHORIZED("E401", "RequestUnauthorized"),//无权访问
    NOT_FOUND("E404", "404 Not Found"),//服务未找到
    METHOD_NOT_SUPPORT("E405", "Method Not Support"),//方法不匹配
    MEDIA_TYPE_NOT_SUPPORT("E415", "Media Type Not Supported"),//Media Type不匹配
    REQ_REJECT("E413", "Request Rejected"),//拒绝服务
    INTERNEL_SERVER_ERROR("E500", "Internel Server Error"),//服务内部异常
    API_TIME_EXCEED("E00001", "api exceed time"),//接口超时
    API_REPEAT_ACCESS("E00002", "api repeat commit"),//数据重复提交
    API_SIGN_CHECK_FAILED_UNSUPPORT_METHOD("E00003", "unsupport sign method"),//签名算法不支持
    API_SIGN_CHECK_FAILED_PARAMTER("E00004", " api check sign failed"),
    VALIDATE_EXCEPTION("E00005", "Validation Error"),
    REDIS_LOCK_FAILED("E00008","获取redis锁失败:{0}"),
    DUPLICATE_KEY_EXCEPTION_ERROR("E00012","数据重复,违反唯一约束，请勿重复操作"),
    PARAM_BIND_ERROR("E00407","参数绑定错误"),
    FEIGN_CALL_FAILURE("E00003","内部调用异常"),
    SRMI_INVALID("E00013","页面停留时间过长,请刷新尝试"),
    APP_INFO_NOT_EXIST("E00001","应用不存在"),
    JWT_NEW_INSTANCE_RSA_JSON_WEB_KEY_ERROR("E00005","新建RSA失败"),

    ;//校验异常

    @Getter
    private String code;
    @Getter
    private String message;
}
